Login     Sign up
Community Activities
Faizan (@faizi)
Join date: Nov 28th 2010
Community posts: 20
View Profile
Send Message

How to change the direction of community activities on the home page from downwards to upwards. I mean to say i want the community activities to go up which are going down on home page.
thanks

164 months ago
AL (@switch48)
Join date: Sep 1st 2010
Community posts: 450
View Profile
Send Message

your theme home.tpl.php

echo '
<div class="block">
<div class="block_title">'.t('Community activities').'</div>
<div class="block_content">
<script type="text/javascript" src="'.uhome().'/js/jquery.vtricker.js"></script>
<script>
jQuery(document).ready(function($) {
$("#recent_activites").fadeIn();
$(\'#recent_activites\').vTicker({
speed: 800,
pause: 5000,
showItems: 4,
animation: \'fade\',
mousePause: false,
height: 350,
direction: \'down\' <======change to up
});
});
</script>

163 months ago
Faizan (@faizi)
Join date: Nov 28th 2010
Community posts: 20
View Profile
Send Message

Thank u switch48

163 months ago
Ameerah (@istylem23)
Join date: Jan 7th 2011
Community posts: 11
View Profile
Send Message

Thanks!

163 months ago
ben toms (@bentoms)
Join date: Mar 5th 2011
Community posts: 26
View Profile
Send Message

What about removing 'Community Activities' altogether?
I've removed the code for it but when I look at my site I I get a syntax error stating that there is an 'unexpected $end on line 290'.
Except, there isn't a '$end' on 290 there is only '</html>'

Any ideas?

161 months ago
Jcow Master (@falcone)
Join date: Sep 2nd 2010
Community posts: 917
View Profile
Send Message

you removed the echo '

........

</script>

did you also remove the ' and ; at the end of this code

161 months ago
ben toms (@bentoms)
Join date: Mar 5th 2011
Community posts: 26
View Profile
Send Message

Here is what I removed,

[code]echo '
<script type="text/javascript" src="'.uhome().'/js/jquery.vtricker.js"></script>
<script>
jQuery(document).ready(function($) {
$(\'#recent_activites\').vTicker({
speed: 800,
pause: 5000,
showItems: 4,
animation: \'fade\',
mousePause: false,
height: 350,
direction: \'down\'
});
});
</script>
<style>

recent_activites li{

    margin:0;
    padding:0;
    }
</style>
<strong>'.t('Community activities').'</strong>
<div id="recent_activites">
<ul>
';
$res = sql_query("SELECT s.*,u.username,u.avatar from `".tb()."streams` as s left join ".tb()."accounts as u on u.id=s.uid where s.hide!=1  order by s.id desc limit 20");
while ($stream = sql_fetch_array($res)) {
    $stream['attachment'] = unserialize($stream['attachment']);
    echo '<li>'.stream_display($stream,'simple').'</li>';
}
echo '</ul>
<div style="position:absolute;left:0;bottom:0px;height:20px;width:100%;background:url('.uhome().'/files/common_css/fade.png) repeat-x"> </div></div>';

}
echo '</td>';[/code]

161 months ago